package com.insight.modules.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import com.insight.common.system.vo.SysDepartModel;
import com.insight.modules.system.entity.SysUserDepart;
import com.insight.modules.system.entity.SysUsers;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface SysUserDepartMapper extends BaseMapper<SysUserDepart>{

	List<SysUserDepart> getUserDepartByUid(@Param("userId") String userId);
    /**
     * 根据部门查询部门用户
     *
     * @param page
     * @param orgCode
     * @param username
     * @param realname
     * @param usernameList
     * @param userIdList
     * @return
     */
    IPage<SysUsers> queryDepartUserPageList(Page<SysUsers> page, @Param("orgCode") String orgCode, @Param("username") String username, @Param("realname") String realname, @Param("usernameList") List<String> usernameList, @Param("userIdList") List<String> userIdList);

    List<SysDepartModel> queryDepartsByUsername(@Param("username") String username);
}
